Fixed FAB bugs.
Merging with Omid
Merge pull request #21 from usik/master

Merged with Omid's code.