Fixing tab/esc problems