some helpers to prevent death to JVM