Fixed bugs in maze swap API

Fixed maze call not properly counted in function list. Also fixed wrong
reference to maze id parameter