Fix for new query overwriting previous