Corrected some reference issues