#27 bugfix & improvment