Total profit calc
minor fix