modified controller to fix issue where program would break on show