discovered wierd casting bug - working on figuring out what is causing it