fixed some locking issues .. more to come
merge