[fix] revision and fixes by @anoemi