fixing query lib location and previous button