Fixed errors after implementing the Widget interface