fix stupid math bug