Fixed preprocessing bug