fixed App.java to fix out of bounds exception