fixed few more bugs