Fixed the wrong class being removed when there is an error on post submit
Reset the createPostOpen variable when it is closed.