Small bug and warning fixed