sharing, some bug fixes