fixes for type implicit type conversions that lose percision
fixing some compiler warnings around attributes not being set correctly