Fix setting offset and limit