Merged random timing and fixed code error handling.