warning fixed

fixed code to get rid of warnings