Fix NPE while sensing movement