Updated to fix IllegalArgumentException?