Fixes

Small fixes to controller and security implementation.