fixing calculator error