fixed wierd reference issue