strip prefix correctly