Fix inventory checker when dealing with whitespace