Bug fixed. There were shadowing function declarations.