Minor fix and refactor
Merge pull request #47 from nsue/refactor-updatePaddlePositions

Minor fix and refactor