fix calculation without conditions