fixed some relative referencing issues - C