Controller code to fix #146