Fixes bug with previous commit causing crash.