Add some extra int checks in fb layout