replaced String.isEmpty with length == 0 which hopefully fixes #25