Fixed some bugs, shared keys working properly