Fixed popup rendering bug