fixing slave mode functoonality