fix trailing slash on key prefix