fix memory read error in laplacian_pyramid