hopefully fixes popup bugs