Added fixed for #333, 334, 335, 336, 337, 338 and 339.