fixed calc problem