Codeigniter activerecord JOIN and table name alias issue

I need help on a particular codeigniter 3.1.6 active record query that keeps returning an error.

The code itself is:

$this->db->select('ms_payments.id, ms_payments.user_id, ms_payments.memberships_user_id, ms_payments.staff_id, ms_payments.rate_amount, ms_payments.tax, ms_payments.coupon, ms_payments.total, ms_payments.currency, ms_payments.pp, ms_payments.date,
u1.first_name AS user_name, u1.last_name AS user_last_name, u2.first_name AS staff_name, u2.last_name AS staff_last_name, 
ms_gateways.displayname AS pp, ms_memberships_users.id, ms_memberships.title AS membership')
      ->from('ms_payments')

      ->join('auth_users as u1', 'u1.id = ms_payments.user_id') 
      ->join('auth_users as u2', 'u2.id = ms_payments.staff_id') 

      ->join($this->gTable, 'ms_gateways.id = ms_payments.pp') 
      ->join($this->muTable, 'ms_memberships_users.id = ms_payments.memberships_user_id')
      ->join($this->mTable, 'ms_memberships.id = ms_memberships_users.membership_id')

      ->where('ms_payments.box_id =', $this->box_id);

$result = $this->db->get()->result();

The issue is related to the first two joins, I suspect is because the table name aliases.

The SQL query generated by $this->db->get_compiled_select() query works perfectly:

SELECT `ms_payments`.`id`, `ms_payments`.`user_id`, `ms_payments`.`memberships_user_id`, `ms_payments`.`staff_id`, `ms_payments`.`rate_amount`, `ms_payments`.`tax`, `ms_payments`.`coupon`, `ms_payments`.`total`, `ms_payments`.`currency`, `ms_payments`.`pp`, `ms_payments`.`date`, 
`u1`.`first_name` AS `user_name`, `u1`.`last_name` AS `user_last_name`, `u2`.`first_name` AS `staff_name`, `u2`.`last_name` AS `staff_last_name`, `ms_gateways`.`displayname` AS `pp`, 
`ms_memberships_users`.`id`, `ms_memberships`.`title` AS `membership`

FROM `ms_payments`

JOIN `auth_users` as `u1` ON `u1`.`id` = `ms_payments`.`user_id`
JOIN `auth_users` as `u2` ON `u2`.`id` = `ms_payments`.`staff_id`

JOIN `ms_gateways` ON `ms_gateways`.`id` = `ms_payments`.`pp`
JOIN `ms_memberships_users` ON `ms_memberships_users`.`id` = `ms_payments`.`memberships_user_id`
JOIN `ms_memberships` ON `ms_memberships`.`id` = `ms_memberships_users`.`membership_id`

WHERE `ms_payments`.`box_id` = '1'

and yet I still get this codeigniter error, any clues why?

Blockquote An uncaught Exception was encountered
Blockquote Type: Error
Blockquote Message: Call to a member function result() on boolean