fixes for 64bit conversion