New modification and bug fixes