fixed my problem somehow by restoring the old rfind and rsed. still no idea why that was.