Fixed type casting error
Small fixes