fixed skipping bug