Fixed minor bugs
Update SQL files