Not always return 0 in getter

fixes pimatic/pimatic#423