fixing acc calc bug