Removed compiler warnings caused by erroneous variable types when passing to functions.