New version with bug fixes