fixed deprecated / broken code