fixed issues mentioned above