Fixing entity stuff