fixed some critical and major issues