bug fixes for last parity commit