fixing has bug