patched controller section of #648