bug fixes for handling nil active_end dates