Query bug fixed, TODO: Access insertion