Fix for authorization bug(ensure states are set)