fix detetion of previous build