Fixing call to trim() function