Fix wrong check of return value in flirt