Added RLocks in order to avoid some multithreading issues, due to Fabric not being thread-safe.