Last char bug fix. Sample added