fix identation bug causing modal appearing without any reason