Implemented workaround for type erasure warnings