Fix preprocessing bug