Fixes undefined index error
Allows trailing slash for controller