Fixing emit_refresh()