Fixing p5 control functions