Re-implemented fix stomped on by merge with bsingh