Fixes #1031

Don't check for a prefix if one doesn't exist.