fixed bugs in shaded plotting