Fixed two issues

Fixed issues with the state icons sometimes appearing wrong.
Fixed issue where screen dim did not end after modal view dismissed.