Minor bugs fixed

- Added variable instead of primitive number for call expecting by reference
- Changed variable $coltype that does not exist for $type

Best,
Carles Mateo