functions for Ae 4/7
Merge branch 'develop' of https://github.com/forkch/adhoc-railway into develop
fixed NPE