fix for valid error