Various bugs has been fixed