Fixed code style.
Fixed bug with count starting from 0.
Signed-off-by:Alex Oleshkevich <alex.oleshkevich@muehlemann-popp.ch>