Fixed errors in mono-running code