Made backward compatible and fixed issue 191