Changed to use the correct ref