Fixes bug in popup render