Fixing some defects