Ticket/un1matr1v/989

Replaces PR #33 

http://www.flying-bits.org/tracker.php?p=33&t=989