BUG FIX: Exception handling