Fixing some small bugs

Fixing some small bugs
Rename some form for better understanding