Fixed potential crash (noticed by Rroia)