fixing more bugs