Fixed unnecessary java warnings