Fixed bug with using master before it was assigned.