Added safety checks for future use.