Some fixes in API & Security controllers