Added a check to make sure we only strip the prefix if it exists.