Fixing crash when using image nth