Attempted to fix the value casting calls.