Fixes bug with error being shown insted of success