Fixed reference bug