Made window set to "Error!" only if an error