Fix for issue #5395

@Ocramius has noted the method is going to be depracte but i thought id try to do a quick patch