Slight modifications for compatibility