fixing detail calc