Small fixes on error handling (for some reason Java 7 catch multiple didn't work)