When my ‘perfect’ solution makes the app crash