fixed some Deprecated warnings