Fix flashmessage closing