bugs fixed concerning some wrong values