Fixed modal popup bug