added pixel collision and fixed rounding error!