Various fixes for maintaining backwards compatibility