Trying to get synchronous mode to work