Fixed minor issue with references